home *** CD-ROM | disk | FTP | other *** search
- *** /dev/null Sun Nov 18 23:51:43 1990
- --- Makefile Mon Nov 19 00:13:34 1990
- ***************
- *** 0 ****
- --- 1,19 ----
- + # @(#)Makefile 5.11 (Berkeley) 5/11/90
- + # heavily modified.... by wollman@emily.uvm.edu
- +
- + PROG= ftp
- + SRCS= cmds.c cmdtab.c ftp.c glob.c main.c ruserpass.c domacro.c
- +
- + #.include <bsd.prog.mk>
- +
- + OBJS= cmds.o cmdtab.o ftp.o glob.o main.o ruserpass.o domacro.o
- + LIBS= -lreadline -lresolv -ltermcap
- +
- + .c.o:
- + gcc -traditional -g -I./ -I../include -o $*.o -c $*.c
- +
- + ftp : $(OBJS)
- + gcc -o ftp $(OBJS) -L$(HOME)/lib -lreadline -lresolv -ltermcap
- +
- + $(OBJS) : ftp_var.h
- +
- *** ftp.c.orig Sun Nov 18 21:21:49 1990
- --- ftp.c Sun Nov 18 23:31:13 1990
- ***************
- *** 83,89 ****
- return((char *) 0);
- }
- hisctladdr.sin_family = hp->h_addrtype;
- ! bcopy(hp->h_addr_list[0],
- (caddr_t)&hisctladdr.sin_addr, hp->h_length);
- (void) strncpy(hostnamebuf, hp->h_name, sizeof(hostnamebuf));
- }
- --- 83,89 ----
- return((char *) 0);
- }
- hisctladdr.sin_family = hp->h_addrtype;
- ! bcopy(hp->h_addr,
- (caddr_t)&hisctladdr.sin_addr, hp->h_length);
- (void) strncpy(hostnamebuf, hp->h_name, sizeof(hostnamebuf));
- }
- ***************
- *** 96,102 ****
- }
- hisctladdr.sin_port = port;
- while (connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0) {
- ! if (hp && hp->h_addr_list[1]) {
- int oerrno = errno;
- extern char *inet_ntoa();
-
- --- 96,102 ----
- }
- hisctladdr.sin_port = port;
- while (connect(s, (struct sockaddr *)&hisctladdr, sizeof (hisctladdr)) < 0) {
- ! if (hp && 0 /*hp->h_addr_list[1]*/) {
- int oerrno = errno;
- extern char *inet_ntoa();
-
- ***************
- *** 104,111 ****
- inet_ntoa(hisctladdr.sin_addr));
- errno = oerrno;
- perror((char *) 0);
- ! hp->h_addr_list++;
- ! bcopy(hp->h_addr_list[0],
- (caddr_t)&hisctladdr.sin_addr, hp->h_length);
- fprintf(stdout, "Trying %s...\n",
- inet_ntoa(hisctladdr.sin_addr));
- --- 104,116 ----
- inet_ntoa(hisctladdr.sin_addr));
- errno = oerrno;
- perror((char *) 0);
- ! /*hp->h_addr_list++;*/
- ! /* This can't work because we don't have an
- ! * h_addr_list in our struct hostent.
- ! * Actually, maybe we do, but <netdb.h> doesn't
- ! * show it.
- ! */
- ! bcopy(hp->h_addr,
- (caddr_t)&hisctladdr.sin_addr, hp->h_length);
- fprintf(stdout, "Trying %s...\n",
- inet_ntoa(hisctladdr.sin_addr));
- *** /dev/null Sun Nov 18 23:51:43 1990
- --- paths.h Sun Nov 18 22:56:51 1990
- ***************
- *** 0 ****
- --- 1,38 ----
- + /*
- + * Copyright (c) 1989 The Regents of the University of California.
- + * All rights reserved.
- + *
- + * Redistribution and use in source and binary forms are permitted provided
- + * that: (1) source distributions retain this entire copyright notice and
- + * comment, and (2) distributions including binaries display the following
- + * acknowledgement: ``This product includes software developed by the
- + * University of California, Berkeley and its contributors'' in the
- + * documentation or other materials provided with the distribution and in
- + * all advertising materials mentioning features or use of this software.
- + * Neither the name of the University nor the names of its contributors may
- + * be used to endorse or promote products derived from this software without
- + * specific prior written permission.
- + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- + *
- + * @(#)paths.h 5.7 (Berkeley) 6/24/90
- + */
- +
- + #define _PATH_BSHELL "/bin/sh"
- + #define _PATH_CONSOLE "/dev/console"
- + #define _PATH_CSHELL "/bin/csh"
- + #define _PATH_DEV "/dev/"
- + #define _PATH_DEVNULL "/dev/null"
- + #define _PATH_DRUM "/dev/drum"
- + #define _PATH_KMEM "/dev/kmem"
- + #define _PATH_MAILDIR "/var/mail"
- + #define _PATH_MAN "/usr/man"
- + #define _PATH_MEM "/dev/mem"
- + #define _PATH_NOLOGIN "/etc/nologin"
- + #define _PATH_SENDMAIL "/usr/sbin/sendmail"
- + #define _PATH_TMP "/tmp/"
- + #define _PATH_TTY "/dev/tty"
- + #define _PATH_UNIX "/vmunix"
- + #define _PATH_VARTMP "/var/tmp"
- + #define _PATH_VI "/usr/bin/vi"
- *** main.c.orig Mon Nov 19 00:38:13 1990
- --- main.c Mon Nov 19 00:37:56 1990
- ***************
- *** 28,33 ****
- --- 28,57 ----
- #endif /* not lint */
-
- /*
- + * This version of FTP has been modified to interface with the GNU
- + * readline and history libraries. The following RCS information is
- + * provided for interested readers. - wollman@emily.uvm.edu
- + */
- +
- + #ifndef lint
- + static char rcsid[] = "$Header: /home/emily1/others/wollman/src/ftp/RCS/main.c,v 5.19 90/11/19 00:21:25 wollman Exp Locker: wollman $";
- + #endif
- + /*
- + * $Log: main.c,v $
- + * Revision 5.19 90/11/19 00:21:25 wollman
- + * Corrected small bug reading input...
- + *
- + * Revision 5.18 90/11/19 00:05:44 wollman
- + * Added initial support for readline. There is a disgusting hack in here.
- + * No support for completion as yet, but we do have history.
- + *
- + * Revision 5.17 90/11/18 23:46:24 wollman
- + * Added information about nature and purpose of modifications for future
- + * reference.
- + *
- + */
- +
- + /*
- * FTP User Program -- Command Interface.
- */
- #include "ftp_var.h"
- ***************
- *** 43,48 ****
- --- 67,74 ----
- #include <ctype.h>
- #include <netdb.h>
- #include <pwd.h>
- + #include <readline/readline.h>
- + #include <readline/history.h>
-
- uid_t getuid();
- sig_t intr();
- ***************
- *** 206,224 ****
- register struct cmd *c;
- struct cmd *getcmd();
- extern int help();
-
- if (!top)
- (void) putchar('\n');
- for (;;) {
- if (fromatty) {
- printf("ftp> ");
- (void) fflush(stdout);
- }
- ! if (gets(line) == 0) {
- ! if (feof(stdin) || ferror(stdin))
- quit();
- ! break;
- }
- if (line[0] == 0)
- break;
- makeargv();
- --- 232,274 ----
- register struct cmd *c;
- struct cmd *getcmd();
- extern int help();
- + char *lineread;
-
- if (!top)
- (void) putchar('\n');
- for (;;) {
- + #ifdef notdef
- if (fromatty) {
- printf("ftp> ");
- (void) fflush(stdout);
- }
- ! #else
- ! if (fromatty) {
- ! lineread = readline("ftp> ");
- ! }
- ! #endif
- ! if (!fromatty) {
- ! if (gets(line) == 0) {
- ! if (feof(stdin) || ferror(stdin))
- ! quit();
- ! break;
- ! }
- ! } else {
- ! if (!lineread) {
- quit();
- ! break;
- ! }
- ! /*
- ! * This is a really ugly hack forced upon us
- ! * because of the fact that line[] is global and
- ! * other functions depend on it. If I find the
- ! * time, I will fix this.
- ! */
- ! strcpy(line,lineread);
- ! if(lineread[0]) add_history(lineread);
- ! free(lineread);
- }
- +
- if (line[0] == 0)
- break;
- makeargv();
- *** /dev/null Sun Nov 18 23:51:43 1990
- --- compat.h Sun Nov 18 23:14:17 1990
- ***************
- *** 0 ****
- --- 1,5 ----
- + /*
- + * Compatibility routines for 4.3-reno ftp on Encore Multimax
- + */
- +
- + typedef int (*sig_t)();
- *** ftp_var.h.orig Sun Nov 18 21:21:52 1990
- --- ftp_var.h Sun Nov 18 23:14:14 1990
- ***************
- *** 20,25 ****
- --- 20,31 ----
- */
-
- /*
- + * Include some definitions to massage the differences betweem 4.3-reno
- + * and Umax.
- + */
- + #include "compat.h"
- +
- + /*
- * FTP global variables.
- */
-
-